<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Component 父子组件关系</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Component 父子组件关系</h1>
    <hr>
    <div id="app">
        <!-- 构造器外部写局部注册组件-->
        <lifeng></lifeng>
    </div>
</body>
<script>
    var city = {
        template:`<div>驻马店属于河南省</div>`
    }
    //注意在template 模板里面写的内容 一定要用大的div包裹着
    
    var lifeng = {
        template:`
                <div>
                    <h1 style="color:red">lifeng form 驻马店</h1>
                    <city></city>
                </div> 
                `,
                components:{
                    "city":city
                }

    }
    var app = new Vue({
        el:"#app",
        components: {
            "lifeng":lifeng,  
        }
    })
</script>
</html>